//
//  JYInter.h
//  OneToOne
//
//  Created by Herui on 8/7/14.
//  Copyright (c) 2014 jiayuan. All rights reserved.
//

#ifndef OneToOne_JYInter_h
#define OneToOne_JYInter_h

//----------------------------Compiler Flag------------------------------------//

#ifndef JYStrong
    #if __has_feature(objc_arc)
    #define JYStrong strong
    #else
    #define JYStrong retain
    #endif
#endif

#ifndef retain
#if __has_feature(objc_arc)
#define retain strong
#else
#define retain retain
#endif
#endif

//------------------------------DeviceManager----------------------------------//
// #import "DeviceManager.h"



#define ZS_HONGNIANG 1 //0代表自己，1代表资深
#define kCurrentHeight ([UIScreen mainScreen].bounds.size.height)
#define kCurrentWidth  ([UIScreen mainScreen].bounds.size.width)


//------------------------------JiaYuanInterClient----------------------------//
#define kAppClientId   11

#ifdef DEBUG
#define kAppChannelId  @"Test"
#else
#define kAppChannelId  @"AppStore"
#endif

#define kNewAppChannelId @"80101"
#define kSecuCode      @"xD}nW(az3eH[ng9>" 
//#define kAppChannelId  9999
//#define kSecuCode      @"89211F09522D57DAD2D81459B7F72751"
//#define INCLUDE_91  1


//---------------------------iTunes更新客户端-----------------------------------//
#define kBuyPlist     @"Buy"
#define kURL_APP      @"http://itunes.apple.com/cn/app/id435057236?l=en&mt=8"
#define kAPP_ID       @"435057236"


//----------------------------
#define DEVICE_IS_IPHONE6P ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1472), [[UIScreen mainScreen] currentMode].size) : NO)
#define DEVICE_IS_IPHONE6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define DEVICE_IS_IPHONE5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define DEVICE_IS_IPHONE4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define DEVICE_IS_PAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define SYSTEM_IS_IOS7  (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)
#define SYSTEM_IS_IOS8  (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1)
#define kAppDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)
#define KJiaYuanShareData [JiaYuanShareData  sharedInstance]

#define IS_IOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0 ? YES : NO)

#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define kScaleFactor ([UIScreen mainScreen].bounds.size.width/320)

#define kJiaYuanFontWithSize(floatSize) ([UIFont fontWithName:@"HelveticaNeue-Light" size:floatSize])

#define kJiaYuanColor ([UIColor colorWithRed:1 green:106/255.0 blue:106/255.0 alpha:1])
#define kBackgroundColor ([UIColor colorWithRed:249.0/255.0 green:249.0/255.0 blue:249.0/255.0 alpha:1])
#define kWidth [UIScreen mainScreen].bounds.size.width

#define kWidthScaleFactor ([UIScreen mainScreen].bounds.size.width/320)
#define kHeightScaleFactor ([UIScreen mainScreen].bounds.size.height/568)
#define kCGRectMake(positionX,positionY,width,height) CGRectMake((positionX)/2*kWidthScaleFactor, (positionY)/2*kHeightScaleFactor,(width)/2*kWidthScaleFactor,(height)/2*kHeightScaleFactor)

// image STRETCH
#define JY_STRETCH_IMAGE(image, edgeInsets) (!SYSTEM_IS_IOS7 ? [image stretchableImageWithLeftCapWidth:edgeInsets.left topCapHeight:edgeInsets.top] : [image resizableImageWithCapInsets:edgeInsets resizingMode:UIImageResizingModeStretch])
// 纬度
#define kCurrentLatitude    [LBSManager defaultManager].currentLatitude
// 经度
#define kCurrentLongitude   [LBSManager defaultManager].currentLongitude



#define kTimeOneDay         24*60*60
#define kMax_Rating         5
#define KSignStatusKey      @"com.jiayuan.SignStatus"

//----------------------------归档常量字符串-------------------------------------//

#define kArchiveIsRememberPwdKey @"rempwd"
#define kArchiveIsAutoLoginKey @"autologin"

//----------------------------UserDefault-----------------------------------//
#define kUCSlientForAttachStampOnFate   @"SilentForAttachStampOnFate"

#define kUDAutoLogin                @"AutoLogin"
#define kUDAutoLoginOpenId          @"AutoLoginOpenId"
#define KUDIsLaunchedGuide          @"com.jiayuan.isLaunchedGuide"
#define kUDLastVersion              @"kUDLastVersion"
#define KUDHasVerseion              @"com.jiayuan.hasNewVersion"
#define KUDVerseionCheckInfo        @"com.jiayuan.versionCheck.dicInfo"
#define KUDForceUpdate              @"com.jiayuan.forceUpdate"
#define KUDAppUpdateUrl             @"com.jiayuan.appUpdateUrl"
#define KUDUpdateAlertWasShowed     @"com.jiayuan.updateAlertWasShowed"
#define kUDOverEdge                 @"OverEdge"
#define kUDPushToken                @"PushToken"
#define kUDPushSoundOption          @"PushSoundActivate"
#define kUDPushShakeOption          @"PushShakeActivate"
#define kUDPushShowDetailOption     @"com.jiayuan.PushShowDetailOption"

#define KUDUserSelectedCity         @"UserSelectedCity"
#define KUDUserLocationCity         @"com.jiayuan.locationCity"

// static NSString *const kJYAccount = @"kJYAccount";
#define kUDJYAccount                @"kJYAccount"
#define kUDJYUserID                 @"kUDJYUserID"
#define kUDJYUserToken              @"kUDJYUserToken"
#define KUDJYVipTpye                @"KUDJYVipTpye"
#define KUDJYVipSex                 @"KUDJYVipSex"
#define KUDJYLikeBoyOrGirl          @"KUDJYLikeBoyOrGirl"
#define KUDJYShopInfoID             @"KUDJYShopInfoID"
#define KUDJYHotLine                @"KUDJYHotLine"
#define KUDInterviewStatus          @"KUDInterviewStatus"
#define KUDEmpRealName              @"KUDEmpRealName"
#define KUDEmpLoginName             @"KUDEmpLoginName"
#define KUDEmpAddress               @"KUDEmpAddress"
#define KUDEmpCity                  @"KUDEmpCity"
#define KUDBankNumber               @"KUDBankNumber"
#define KUDIDCard                   @"KUDIDCard"

#define KUDJYUserNewSortTpye        @"KUDJYUserNewSortTpye"


//----------------------------Notification------------------------------------//

#define kNotificationUserInfoKey    @"kNotificationUserInfoKey"



#define kNotificationTokenStatus    @"JiaYuanTokenStatus"
#define kNotificationSign           @"JiaYuanSignState"  // 该通知将注册和登录糅合在一起不安全
#define kNotificationSignUp         @"kNotificationSignUp"
#define kNotificationApplyService   @"kNotificationApplyService"
#define kNotificationShare          @"JiaYuanShareInfo"








typedef NS_ENUM(NSInteger,JYVIPTpye) {
    
    JYVIPTpyeNone             = 1,                // 1. 都不是
    JYVIPTpyePayMoney         = 2,                // 2. 付费 (vip会员)
    JYVIPTpyeApplyService     = 3,                // 3. 申请了服务 (已经报名)
    JYVIPTpyeApplyingService  = JYVIPTpyeNone,    //    正在申请服务
    JYVIPTpyeUnLogin          = 4,                // 4. 尚未登录
    
};


typedef NS_ENUM (NSInteger, JYMeetTpye) {
    
    JYMeetTpyeNotSure      = 0,    // 0:不确定
    JYMeetTpyeReserve      = 1,    // 保留值，无意义
    JYMeetTpyeCommanding   = 2,    // 候选
    JYMeetTpyeMatching     = 3,    // 待安排
    JYMeetTpyeChecking     = 4,    // 待确认
    JYMeetTpyeAssigning    = 5,    // 待评价
    JYMeetTpyeCompletion   = 6,    // 已评价
    
    
    JYWantMeetNotCheck = 0,   // 0 想见, 红娘还没有安排
    JYWantMeetHaveTime,       // 1 红娘安排了还没有到时间
    JYMeetedHaveAssign,       // 2 约见了且评价了
    JYMeetedNotAssign         // 3 约见了但没有评价
    
};

typedef enum {
    JYDateDone = 0,            // 0 完成约会
    JYDateContact,             // 1 联络中
    JYDateNot,                 // 2 还没有见过
    JYDateUnLogin              // 3 未登录想约见
    
} JYDateType;


typedef NS_ENUM (NSInteger, JYBubbleMessageMediaType) {
    JYBubbleMessageMediaTypeText = 0,
    JYBubbleMessageMediaTypePhoto = 1,
    JYBubbleMessageMediaTypeVideo = 2,
    JYBubbleMessageMediaTypeVoice = 3,
    JYBubbleMessageMediaTypeEmotion = 4,
    JYBubbleMessageMediaTypeLocalPosition = 5,
};

typedef NS_ENUM(NSInteger, JYBubbleMessageType) {
    JYBubbleMessageTypeSending = 0,
    JYBubbleMessageTypeReceiving
};




typedef NS_ENUM (NSInteger, JYAD) {
    JYADUnset                       = 0,   // 跳转过后赋空值
    
    
    
    JYADUnLoginWelcome,                    // 未登录服务介绍页面
    JYADServiceCenter,                     // 服务中心查询
    JYADWelcome = JYADUnLoginWelcome,      // 服务介绍
    JYADSet,                               // 设置
    JYADLogin,
    JYADRegister,                          // 注册
   
};






#endif
